package com.wx.mythread.singleton;

/**
 * 2.饿汉式（静态代码块）  （可用）
 * 类加载的时候就会实例化
 */
public class Singleton2 {

    private final static Singleton2 INSTANCE;

    static {
        INSTANCE = new Singleton2();
    }

    private Singleton2(){}

    public static Singleton2 getINSTANCE() {
        return INSTANCE;
    }
}
